Make sure a 64-bit char is never passed to ENCODE_CHAR.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 13 Jun 2011 01:07:35 +0000 (18:07 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 13 Jun 2011 01:07:35 +0000 (18:07 -0700)
commitec6aaccd65d6cc6790652fad02f9affd0947c806
tree151e641264ee455d5a067bb19e0ed3ba6efcfbe8
parentfb0b81fb035d1f56b22a9fcab7aa88a12c513090
Make sure a 64-bit char is never passed to ENCODE_CHAR.

This is for reasons similar to the recent CHAR_STRING fix.
* charset.c (Fencode_char): Check that character arg is actually
a character.  Pass an int to ENCODE_CHAR.
* charset.h (ENCODE_CHAR): Verify that the character argument is no
wider than 'int', as a compile-time check to prevent future regressions
in this area.
src/ChangeLog
src/charset.c
src/charset.h